package com.mux.springboot.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * 读取外部配置文件采用这种方式，@ConfigurationProperties locations 属性，在springboot 1.4 被弃用，1.5中会被移除
 * @author devin.chen
 *
 */
@Configuration
@PropertySource(value="classpath:config/param.properties", ignoreResourceNotFound=true)
public class ParamProperties {
	@Value("${param.name}")
	private String name;
	@Value("${param.age}")
	private int age;
	public String getName() {
		return name;
	}
	public int getAge() {
		return age;
	}
	
	
}
